import * as removeModel from '../../models/remove' 

const remove = ({$box, url, loadData}) => {
  $box.on('click', '.btn-remove',async function(e){
    // 删除指定用户
    let res = await removeModel.remove({url, id: $(this).data('id')})
    alert(res.data.message)
    if(res.ret) {
      loadData()
    }
  })
}

export {
  remove
}